﻿#ifndef DEVICECAMERA_H
#define DEVICECAMERA_H

#include <QCamera>
#include <QCameraInfo>
#include <QCameraViewfinder>
#include <QCameraImageCapture>
#include <QDebug>
#include <QTime>
#include <QList>
#include <QtWidgets/QLabel>

/**
相机设备
*/
class DeviceCamera  : public QObject {
    Q_OBJECT
  public:
    DeviceCamera(QLabel *camera_show);
    ~DeviceCamera();
    int initCamera(QLabel *cameraLabel);


  public slots:
    void captureCameraToSave(int id, const QImage &preview);
    void capturePic(QString picPath);

  private:
    QCamera *camera;
    QCameraViewfinder *viewfinder;
    QCameraImageCapture *imageCapture;
    QString *currentPicPath;
};

#endif // DEVICECAMERA_H
